#ifndef _SINGLETON_H_
#define _SINGLETON_H_
#include <iostream>


class Singleton
{
protected:
	Singleton(){}
public:
	~Singleton(){}
	void print();


	static Singleton& Instance()
	{
		static Singleton singleton;
		return singleton;
	}

	static Singleton* getInstancePtr()
	{
		if (_instance == NULL)
		{
			_instance = new Singleton;
		}

		return _instance;
	}

private:
	static Singleton* _instance;
};

#define sSingleton Singleton::Instance()
#define sSingletonPtr Singleton::getInstancePtr()

#endif